home *** CD-ROM | disk | FTP | other *** search
/ Cre@te Online 2000 December / Cre@teOnline CD05.iso / MacSoft / XML ConsoleMax.sea / XML ConsoleMax / Required / esc.jar / com / extensibility / xa / NotationTable.class (.txt) < prev    next >
Encoding:
Java Class File  |  2000-06-30  |  1.4 KB  |  56 lines

  1. package com.extensibility.xa;
  2.  
  3. import com.extensibility.rock.RTable;
  4. import com.extensibility.rock.table.QlickerDataSource;
  5. import com.extensibility.xml.NotationDeclaration;
  6. import javax.swing.JTable;
  7. import javax.swing.table.TableCellEditor;
  8.  
  9. public final class NotationTable extends DeclTable {
  10.    NotationModel model;
  11.  
  12.    public NotationTable(NotationModel var1) {
  13.       super(var1);
  14.       this.model = var1;
  15.    }
  16.  
  17.    public int getInitialWidth(int var1) {
  18.       return var1 == 2 ? 100 : 0;
  19.    }
  20.  
  21.    public double getColumnWeight(int var1) {
  22.       switch (var1) {
  23.          case 2:
  24.             return 0.2;
  25.          case 3:
  26.             return 0.4;
  27.          case 4:
  28.             return 0.4;
  29.          default:
  30.             return (double)0.0F;
  31.       }
  32.    }
  33.  
  34.    public NotationDeclaration getSelectedNotation() {
  35.       int var1 = ((RTable)this).getSelectedRow();
  36.       return var1 < 0 ? null : ((NotationModel)((JTable)this).getModel()).getNotation(var1);
  37.    }
  38.  
  39.    public TableCellEditor createCellEditor(int var1) {
  40.       switch (var1) {
  41.          case 2:
  42.             return new NameQlicker((QlickerDataSource)null);
  43.          case 3:
  44.             return new SystemQlicker((QlickerDataSource)null);
  45.          case 4:
  46.             return new PublicQlicker((QlickerDataSource)null);
  47.          default:
  48.             return null;
  49.       }
  50.    }
  51.  
  52.    public boolean hasCellDialog(int var1, int var2) {
  53.       return var2 == 3 || var2 == 4;
  54.    }
  55. }
  56.